//
//  TabBarController.m
//  xychain_DM_iOS
//
//  Created by Jpwang on 2018/5/21.
//  Copyright © 2018年 Jpwang. All rights reserved.
//

#import "TabBarController.h"

@interface TabBarController ()

@end

@implementation TabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self initView];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)initView {
    [self.navigationItem setHidesBackButton:YES];
    self.navigationController.viewControllers = [NSArray arrayWithObject:self.navigationController.viewControllers.lastObject];
    
    [[[NSNotificationCenter defaultCenter] rac_addObserverForName:@"changeTab" object:nil] subscribeNext:^(id x) {
        NSString *index = ((NSNotification *)x).object;
        self.selectedIndex = [index intValue];
    }];
}




@end
